package com.atguigu.gulimall.member.service;

import com.atguigu.gulimall.member.exception.PhoneExistsException;
import com.atguigu.gulimall.member.exception.UsernameExistsException;
import com.atguigu.gulimall.member.vo.LoginUserVo;
import com.atguigu.gulimall.member.vo.RegisterUserVo;
import com.atguigu.gulimall.member.vo.SocialUserVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.member.entity.MemberEntity;

import java.util.Map;

/**
 * 会员
 *
 * @author xiaolin
 * @email 956704533@qq.com
 * @date 2020-06-09 09:03:22
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void register(RegisterUserVo vo);
    //判断用户名是否唯一
    void isUniqueUsername(String username) throws UsernameExistsException;
    //判断手机号是否唯一
    void isUniquePhone(String phone) throws PhoneExistsException;

    //普通登录
    MemberEntity login(LoginUserVo vo);
    //社交登录
    MemberEntity login(SocialUserVo vo);
}

